<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<jsp:include page="header.jsp"></jsp:include>
		<title>采购单--填写核对订单信息</title>
  		<script type="text/javascript">
			$(function(){
				var $bodyHei = $(document).height();
				$('#shadow').css('height',$bodyHei); // 页面高度
				// 点击申请代理弹出
				$('#add-info').click(function(){
					$('#shadow').css('display','block');
					$('.add-ress').css({'display':'block'});
				});
				$('.close').click(function(){
					$(this).parent().parent().css('display','none');
					$('#shadow').css('display','none');
				});
				
				// 当前默认的地址（第几个）
				var $addNum = 0;
				var $addUl = $('#info-cont');
				var $addLi = $('#info-cont li');
				
				var $addName = $('#info-cont .info-name');
				var $addChangA = $('#info-cont .add-changea');
				var $addDelA = $('#info-cont .add-dela');
				
				
				$addName.click(function(){
//					alert($(this).index())
					var $n = $(this).parent().index();
					$addLi.removeClass('active');
					$(this).parent().addClass('active');
					$addNum = $n;
				});
				$addChangA.click(function(){
					$('#shadow').css('display','block');
					$('.add-ress').css({'display':'block'});
				});
				$addDelA.click(function(){
					$(this).parent().parent().remove();
				});
			});
		</script>
	</head>
	<body>
<div class="J-header"></div>

		<div class="wrap">
			 <div class="breadNavBg">
            <div class="breadNav pb10">
                <div><a>首页</a>&nbsp;&gt;&nbsp;</div><h1><a >手机/数码/配件</a>&nbsp;&gt;&nbsp;<a >手机通讯</a>&nbsp;&gt;&nbsp;<span>手机</span>
            </div>
        </div><!--breadNavBg-->
			<div class="content">
				<div class="title">
					<h2>填写核对订单信息</h2>
					
					<div class="stepflex">
						<div class="step-con">
							<dl class="old">
								<dt class="s-num">1</dt>
								<dd class="s-text">
									1.我的采购单
									<s></s>
									<b></b>
								</dd>
							</dl>
							<dl class="now">
								<dt class="s-num">2</dt>
								<dd class="s-text">
									2.填写核对订单信息
									<s></s>
									<b></b>
								</dd>
							</dl>
							<dl>
								<dt class="s-num">3</dt>
								<dd class="s-text">
									3.成功提交订单
									<s></s>
									<b></b>
								</dd>
							</dl>
						</div>
						
					</div>

				</div>

				<div class="lineH"></div>
				<!-- 收货人信息 -->
<form method="post"  name="order" action="OrderAdd2">	
				<div class="sign-info">
					<div class="info-tit">
						<h3>收货人信息</h3>
						<div class="sign-info-add">
							<a id="add-info" href="javascript:;">新增收货地址</a>
						</div>
					</div>
					<div class="info-cont">
						<ul id="info-cont">
							<c:forEach items="${cartVo.consignees }" var="con">
								<li class="active">
									<div class="info-name">
										<input type="checkbox" name="coid" value="${con.coid}">   <span>${con.name }</span>
										<b></b>
									</div>
									<div class="info-add">
										<span>${con.address }</span>
										<span>${con.phone }</span>
									</div>
									<div class="info-btns">
										<a class="add-changea" href="javascript:;">编辑</a>
										<a class="add-dela" href="javascript:;">删除</a> 
										<!-- <a class="add-dela" href="ConsigneeDelete">删除</a> -->
									</div>
								</li>
							</c:forEach>	
						</ul>
					</div>
				</div>
				<!--拆分订单-->
			
				<div class="sp-order">
					<h4><strong>确认商品信息</strong><a href="CartShow">返回我的采购单修改</a></h4>
					<table cellspacing="0" cellpadding="0">
						<tr><th width="710">通药采集</th><th width="210">数量</th><th>金额</th></tr>
						<c:forEach items="${cartVo.cartShows }" var="p">
							<tr class="sp-con">
								<td class="tdl"><img class="img" src="${p.fileName }"  alt=""/>${p.summary } ${p.spec}</td>
								<td>${p.count }</td>
								<td class="sp-pri">${p.subprice }</td>
							</tr>
						</c:forEach>
					</table>
					<div class="sp-list">
						<span><em>${cartVo.count }</em>种商品，总共<em>${cartVo.count2 }</em>件，商品总金额<em>${cartVo.totalprice }</em></span>
					</div>
					<div class="clear"></div>
				</div>
				
				<!--确认订单(分单)-->
				<div class="sp-add">
					<div class="sp-sub" style="margin-right:45px;">
						应付金额：<em>￥${cartVo.totalprice }</em>
					</div>
					<span style="color:black;font-size:28px;margin-left:1000px;"><input type="submit" value="确认购买"/></span>
                    <!-- <a href="caigoudan3.jsp" class="btn btn-warning fr">确认购买</a> -->
				</div>
			</div>
		</div>
</form>		
		
		<div id="shadow" style="display: none;"></div>
		<!-- 新增收货地址 -->
		<div class="add-ress" style="display: none;">
			
			<div class="add-address">	
				<span class="close">×</span>
				<h3>编辑收货人信息</h3>
				<div class="item">
					<span class="label"><span style="color: red;padding:0 2px;">*</span>收货人：</span>
					<div class="fl"><input type="text" class="itext"/></div>
				</div>
				<div class="item">
					<span class="label"><span style="color: red;padding:0 2px;">*</span>所在地区：</span>
					<div class="fl"><span>
						<span>
							<select name="city" class="selt selt-s">
								<option value="0">请选择</option>
								<option value="1">北京</option>
								<option value="2">上海</option>
								<option value="3">河北</option>
							</select>
						</span>
						<span>
							<select name="city" class="selt selt-shi">
								<option value="0">请选择市</option>
								<option value="1">北京</option>
								<option value="2">上海</option>
								<option value="3">河北</option>
							</select>
						</span>
						<span>
							<select name="city" class="selt selt-x">
								<option value="0">请选择县</option>
								<option value="1">北京</option>
								<option value="2">上海</option>
								<option value="3">河北</option>
							</select>
						</span>
					</span></div>
				</div>
				<div class="item">
					<span class="label"><span style="color: red;padding:0 2px;">*</span>详细地址：</span>
					<div class="fl"><input type="text" class="address"/></div>
				</div>
				<div class="item">
					<span class="label"><span style="color: red;padding:0 2px;">*</span>手机号：</span>
					<div class="fl"><input type="text" class=""/></div>
					<div class="fl"><span class="label"><span style="color: red;padding:0 2px;">*</span>固定电话：</span><input type="text" class=""/></div>
				</div>
				<div class="item">
					<span class="label">邮箱：</span>
					<div class="fl">
						<input type="text" class="email"/>
						<div class="email-tx">用来接收订单提醒邮件，便于您及时了解订单状态</div>
					</div>
				</div>
				<div class="item">
					<span class="label"></span>
					<div class="fl"><a class="a-sub" href="javascript:;"><span class="sub">保存地址</span></a></div>
				</div>
			</div>
		</div>		
		
		
		      <iframe src="footer.jsp" frameborder="0" width="100%" height="462" scrolling="no"></iframe>
	</body>
</html>